import request from '@/utils/request'

// 查询服务商申请列表
export function listPartner(query) {
  return request({
    url: "/api/partner/service/approval/list",
    method: "get",
    params: query,
  });
}

// 查询服务商申请详细
export function getPartner(id) {
  return request({
    url: '/api/partner/service/' + id,
    method: 'get'
  })
}

// 新增服务商申请
export function addPartner(data) {
  return request({
    url: '/api/partner/service',
    method: 'post',
    data: data
  })
}

// 修改服务商申请
export function updatePartner(data) {
  return request({
    url: '/api/partner/service',
    method: 'put',
    data: data
  })
}

// 删除服务商申请
export function delPartner(id) {
  return request({
    url: '/api/partner/service/' + id,
    method: 'delete'
  })
}

// /api/partner/service/platform/info
export function platformInfo(query) {
  return request({
    url: '/api/partner/service/platform/info',
    method: 'get',
    params: query
  })
}

export function approval(query) {
  return request({
    url: "/api/partner/service/approval",
    method: "get",
    params: query,
  });
}

// 
// /api/partner/service/platform/add

export function addservice(data) {
  return request({
    url: '/api/partner/service/platform/add',
    method: 'post',
    data: data
  })
}

// 审核拒绝
export function reject(query) {
  return request({
    url: "/api/partner/service/reject",
    method: "post",
    params: query,
  });
}
